<template>
  <div>
     <form>
        <input type="text" name="username" v-model.lazy.trim.number="form.userName">

        <input type="text" name="password" v-model.lazy.number.trim="form.password">

        <button @click.prevent.stop='fn'>提交</button>
    </form>
   </div>
</template>
 
<script>
export default {

  data() {
    return {
      msg:'杭州的第一场雪',
      form:{
        userName:'',
        password:'',
      }
    }
  
  },
  methods: {
    fn(){
      console.log(this.form.userName);
      console.log(this.form.password);
      
      
    }
  }
};
</script>

<style scoped>
     
</style>